package com.hzit.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hzit.order.entity.Address;
import com.hzit.order.mapper.AddressMapper;
import com.hzit.order.service.IAddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wf
 * @since 2024-02-27
 */
@Service
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements IAddressService {

	//1. 根据登录的用户login得到用户列表
	@Override
	public List<Address> findAddressByUserId(String login) {
		return list(new QueryWrapper<Address>().eq("user_id",login));
	}
}
